﻿@model TaskSchedule

@{
    ViewData["Title"] = "Delete Task";
}

<h2>Delete Task</h2>

<h3>Are you sure you want to delete this task?</h3>
<div>
    <hr />
    <dl class="row">
        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.Name)
        </dt>
        <dd class="col-sm-10">
            @Html.DisplayFor(model => model.Name)
        </dd>

        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.Url)
        </dt>
        <dd class="col-sm-10">
            @Html.DisplayFor(model => model.Url)
        </dd>

        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.CronExpression)
        </dt>
        <dd class="col-sm-10">
            @Html.DisplayFor(model => model.CronExpression)
        </dd>

        <dt class="col-sm-2">
            Status
        </dt>
        <dd class="col-sm-10">
            @if (Model.IsActive)
            {
                <span class="badge badge-success">Active</span>
            }
            else
            {
                <span class="badge badge-secondary">Inactive</span>
            }
        </dd>
    </dl>

    <form asp-action="Delete">
        <input type="hidden" asp-for="Id" />
        <input type="submit" value="Delete" class="btn btn-danger" />
        <a asp-action="Index" class="btn btn-secondary">Back to List</a>
    </form>
</div>